package com.own.business.wechat.base.service;

import com.own.business.wechat.base.entity.bo.WechatUserBo;
import com.own.business.wechat.base.entity.map.WechatUserMapVo;
import com.own.business.wechat.base.entity.po.WechatUser;
import com.own.business.wechat.base.entity.query.WechatUserQuery;
import com.own.business.wechat.base.entity.vo.WechatUserVo;
import com.own.component.common.base.service.BaseService;

import java.util.function.Consumer;

/**
 * WechatUserService
 *
 * @author chenxueli
 * @date 2023-06-29 22:28:56
 */
public interface WechatUserService extends BaseService<
        WechatUser,
        WechatUserBo,
        WechatUserVo,
        WechatUserMapVo,
        WechatUserQuery
        > {

    /**
     * 保存微信用户信息
     *
     * @param appId    应用id
     * @param openId   微信用户唯一标识
     * @param consumer 解析获取微信用户信息的方法
     * @return 微信用户信息
     */
    WechatUser save(String appId, String openId, Consumer<WechatUser> consumer);

}

